import osSRC.Format;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.util.Scanner;

// Press Shift twice to open the Search Everywhere dialog and type `show whitespaces`,
// then press Enter. You can now see whitespace characters in your code.
public class Main {
	public static void main(String[] args) {
//		Format.outputDig(1);
//		Format.outputDig(2);
		int sum=0;
		try{
			Scanner scanner = new Scanner(new File("src\\1.txt"));
			while (true){
				try{
					sum += scanner.nextInt();
				}
				catch (InputMismatchException inputMismatchException){
					continue;
				}
			}
		}
		catch (FileNotFoundException fileNotFoundException){
			System.out.println("Path Error");
		}
		catch (NoSuchElementException noSuchElementException){
			System.out.println("sum:"+sum);
		}

	}
}